#include<stdio.h>
#include<stdlib.h>
int main()
{
	int n, r, sum = 0;
	printf("input n=");
	scanf("%d", &n);
	for (r = 0; r<= n; r++)
	{
		sum = sum + r;
	}
	printf("sum=%d", sum);
	system("pause");
	return 0;
}
